﻿
#ifndef _MAP_LOGIC_H_
#define _MAP_LOGIC_H_

#include "../share/common_singleton.h"
#include "../share/jsonmessage.h"
#include "../share/proxy_head.h"
#include "Player.h"

class CMapLogic :public common::CSingleton<CMapLogic>
{
public:
	CMapLogic(){}
	~CMapLogic(){}
public:
	void Initialize();
public:
	// 客户端消息
	static void SGeneralLuaMessageReq(Player& player, const CJsonMessageBase& msg);
	static void SPlayerWalkInfo(Player& player, const CJsonMessageBase& msg);
	static void SPlayerLoadSceneFinished(Player& player, const CJsonMessageBase& msg);
	static void SPlayerChangeScene(Player& player, const CJsonMessageBase& msg);
	static void SPing(Player& player, const CJsonMessageBase& msg);
	static void SNotify(Player& player, const CJsonMessageBase& msg);
	static void SLoginPlayerQuitGameNotify(Player& player, const CJsonMessageBase& msg);
	static void SLoseBlood(Player& player, const CJsonMessageBase& msg);
	static void SPlayerRevive(Player& player, const CJsonMessageBase& msg);
	static void SHeal(Player& player, const CJsonMessageBase& msg);
	
	void PlayerLoginMapServerRequest(int32_t fd, const CJsonMessageBase& msg);

	// 服务器消息
	static void SChangePlayerSomethingNotify(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void SGeneralLuaMessageReqServer(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void SChangePlayerPetStatus(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void OnMsgPlayerHeroInfoChangeRequest(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void OnMsgG2MHeartRequest(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void OnMsgSendPlayerLoginInfo(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void PlayerLoginAgainReq(const common::CProxyHead& head, const CJsonMessageBase& msg);
	static void SPingFromGame(const common::CProxyHead& head, const CJsonMessageBase& msg);
};

#endif